package com.iss.okair.db.mapper;

import com.iss.okair.db.entity.AssetsNormal;
import com.iss.okair.db.entity.AssetsTranUse;
import com.iss.okair.db.entity.Assetstrans;
import com.iss.okair.db.mapper.transsql.NormalTransSQL;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

public interface NormalTransMapper {
    @SelectProvider(type = NormalTransSQL.class,method = "select")
    List<AssetsTranUse> select(AssetsTranUse trans);
    @SelectProvider(type = NormalTransSQL.class,method = "selectout")
    List<AssetsTranUse> selectout(AssetsTranUse trans);
    @Insert("INSERT INTO assetstrans VALUES(#{id},#{assetsid},#{batchno},#{transtype},#{count},#{price},#{handleremp},#{instocktime},#{targetemp},#{comment},NOW(),#{createuser})")
    int add(Assetstrans trans);
    @Select("SELECT *FROM alltranslist WHERE assetsid=#{assetsid}")
    List<AssetsTranUse> Record(String assetsid);
}
